# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=opensmtpd-table-passwd
pkgver=1.0.1
pkgrel=0
pkgdesc="OpenSMTPD passwd tables"
url="https://github.com/OpenSMTPD/table-passwd"
arch="all"
license="ISC"
makedepends="
	autoconf
	automake
	"
subpackages="$pkgname-doc"
source="https://github.com/OpenSMTPD/table-passwd/archive/$pkgver/opensmtpd-table-passwd-$pkgver.tar.gz"
builddir="$srcdir/table-passwd-$pkgver"
options="!check"  # upstream does not provide tests

prepare() {
	default_prepare
	./bootstrap
}

build() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--sysconfdir=/etc/smtpd
	make
}

package() {
	make DESTDIR="$pkgdir" smtpdir="/usr/lib/opensmtpd" install
}

sha512sums="
5b2db3a652b78f3b161b55914b2b084c75c839a44fa94b4bd161fb6337029a33ea045d3d9fcfc11810213ec67f550d677c8820acc3b1341dd9253753415ce6f6  opensmtpd-table-passwd-1.0.1.tar.gz
"
